<?php
class EnhancedModel extends ActiveRecord\Model {
    
    public function attributes_but($exclude) {
        $attrs = $this->attributes();
        foreach ($exclude as $exc) {
            unset($attrs[$exc]);
        }
        return $attrs;
    }
    
    public function update_attributes_filter($attributes,$only) {
        $filtered_attributes = array_intersect_key($attributes, $only);
        return $this->update_attributes($filtered_attributes);
    }
}
?>
